I am learning Kotlin using IntelliJ IDEA Community IDE (first time using both) and after restarting the IDE, a simple file no longer finishes building when attempting to run it.
Under the Build panel, it will be stuck at the task
Kotlin: performing incremental compilation analysis
I let it run this task (16 core 5950X, 128 GB DDR4, Ubuntu 20.04) for 2 days already and there is still no progress. Restarting IntelliJ IDE does not help. Even reinstalling it does not fix it.
IntelliJ IDEA Community was installed as a Snap using "Ubuntu Software" app.
Any ideas how we can get it to work again?
Thanks!
Build Output:
Executing pre-compile tasks…
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Kotlin: connecting to daemon
Kotlin: compiling [Test]
Kotlin: kotlinc-jvm 1.6.10-release-923 (JRE 17.0.1+12-Ubuntu-120.04)
Kotlin: performing incremental compilation analysis
[EDIT] I re-enabled incremental compilation to get the thread dump and the problem has not recurred.
This is the least helpful answer but since my project is just for study I've disabled incremental compiling.
Preferences > Build, Execution, Deployment > Compiler > Kotlin Compiler
Kotlin to JVM > Enable incremental compilation Kotlin to JavaScript > Enable incremental compilation
I don't recommend this for real projects.
Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Compiler.
On the Kotlin Compiler page, disable the "Enabled incremental compilation" checkbox.